/*******************************************************************************
 * Copyright (c) Jerges A. Bello G. 2014. Reservado todos los derechos.
 ******************************************************************************/
package com.jabex.persistence.dao;

import com.jabex.common.exceptions.ErrorFunctionalException;
import com.jabex.common.exceptions.ErrorOperationalException;
import com.jabex.common.exceptions.WarningFunctionalException;
import com.jabex.persistence.model.Identity;
import org.hibernate.HibernateException;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * UserTO: Jerges Bello
 * Date: 5/11/13
 * Time: 23:21
 * To change this template use File | Settings | File Templates.
 */
public interface IAccessDAO<B extends Identity> {


	public String persist(B entity) throws WarningFunctionalException, ErrorFunctionalException, ErrorOperationalException;

	public boolean update(B entity) throws WarningFunctionalException, ErrorFunctionalException, ErrorOperationalException;


	public boolean delete(B entity) throws WarningFunctionalException, ErrorFunctionalException, ErrorOperationalException;


	public B getObjectById(String id) throws WarningFunctionalException, ErrorFunctionalException, ErrorOperationalException;

	public List<B> getObjectByParameters(B bean) throws WarningFunctionalException, ErrorFunctionalException, ErrorOperationalException;

	public List<B> getAllRows(B entity) throws HibernateException;

}
